package com.gxr.dao;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

import com.dao.ObjectDao;
import com.pro.bean.Unit;

public class CmpDao extends ObjectDao{
	
	public List find(String cmpname) {
		String sql = "select *from Unit where 1=1 ";
		
		if(cmpname!=null&&!cmpname.equals("")){
			sql += " and Unit.unitname like '"+"%" + cmpname+"%"+"'";}
		
		System.out.println("sql find id -->" + sql);
		return super.findAll(sql, new Unit());
	}
}
